package com.easydl.project.amqp.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.easydl.project.amqp.service.EasydlAmqpService;

@Controller
@RequestMapping("/rabbit")
public class MargoRabbitController {
	
	@Autowired
	private EasydlAmqpService easydlAmqpService;
	
	/**
	 * http://localhost:8080/rabbit/nack?message=margo
	 * @param message
	 * @return
	 */
	@RequestMapping("/nack")
	@ResponseBody
	public String sendMessageNack(String message) {
		easydlAmqpService.sendMessageNack("margo");
		return "hello word";
	}
}
